package com.spvs.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.spvs.common.core.annotation.Excel;
import com.spvs.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 存储文件切片的元数据对象 file_chunks
 *
 * @author supervision
 * @date 2024-12-13
 */
public class FileChunks extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键，自增ID */
    private Long id;

    /** 文件的MD5值 */
    @Excel(name = "文件的MD5值")
    private String fileMd5;

    /** 切片编号 */
    @Excel(name = "切片编号")
    private Integer chunkNumber;

    /** 切片大小（字节） */
    @Excel(name = "切片大小", readConverterExp = "字=节")
    private Long chunkSize;

    /** 切片上传时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "切片上传时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date uploadTime;

    /** 切片在文件系统中的存储路径 */
    @Excel(name = "切片在文件系统中的存储路径")
    private String filePath;

    /** 扩展字段 */
    @Excel(name = "扩展字段")
    private Integer infoExtend1;

    /** 扩展字段 */
    @Excel(name = "扩展字段")
    private String infoExtend2;

    /** 扩展字段 */
    @Excel(name = "扩展字段")
    private String infoExtend3;

    /** 扩展字段 */
    @Excel(name = "扩展字段")
    private String infoExtend4;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setFileMd5(String fileMd5)
    {
        this.fileMd5 = fileMd5;
    }

    public String getFileMd5()
    {
        return fileMd5;
    }
    public void setChunkNumber(Integer chunkNumber)
    {
        this.chunkNumber = chunkNumber;
    }

    public Integer getChunkNumber()
    {
        return chunkNumber;
    }
    public void setChunkSize(Long chunkSize)
    {
        this.chunkSize = chunkSize;
    }

    public Long getChunkSize()
    {
        return chunkSize;
    }
    public void setUploadTime(Date uploadTime)
    {
        this.uploadTime = uploadTime;
    }

    public Date getUploadTime()
    {
        return uploadTime;
    }
    public void setFilePath(String filePath)
    {
        this.filePath = filePath;
    }

    public String getFilePath()
    {
        return filePath;
    }
    public void setInfoExtend1(Integer infoExtend1)
    {
        this.infoExtend1 = infoExtend1;
    }

    public Integer getInfoExtend1()
    {
        return infoExtend1;
    }
    public void setInfoExtend2(String infoExtend2)
    {
        this.infoExtend2 = infoExtend2;
    }

    public String getInfoExtend2()
    {
        return infoExtend2;
    }
    public void setInfoExtend3(String infoExtend3)
    {
        this.infoExtend3 = infoExtend3;
    }

    public String getInfoExtend3()
    {
        return infoExtend3;
    }
    public void setInfoExtend4(String infoExtend4)
    {
        this.infoExtend4 = infoExtend4;
    }

    public String getInfoExtend4()
    {
        return infoExtend4;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("fileMd5", getFileMd5())
            .append("chunkNumber", getChunkNumber())
            .append("chunkSize", getChunkSize())
            .append("uploadTime", getUploadTime())
            .append("filePath", getFilePath())
            .append("infoExtend1", getInfoExtend1())
            .append("infoExtend2", getInfoExtend2())
            .append("infoExtend3", getInfoExtend3())
            .append("infoExtend4", getInfoExtend4())
            .toString();
    }
}
